<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="/styles/jquery-ui.css" >
<link rel="stylesheet" href="/styles/blueimp-gallery.css">
</head>
<body>
<div class="p-h-md p-v bg-white box-shadow pos-rlt">
  <h3 class="no-margin have-btn-title">落地页管理</h3>
  <a href="" type="button" class="btn btn-sm btn-primary ng-click-active pull-right add-advert-btn-style"
    <i class="glyphicon glyphicon-plus"></i>
    查看客资统计
  </a>
  <a href="/landingForms/list" type="button" class="btn btn-sm btn-primary ng-click-active pull-right add-advert-btn-style"
    <i class="glyphicon glyphicon-plus"></i>
    表单列表
  </a>
  <a href="/landingpage/add" type="button" class="btn btn-sm btn-primary ng-click-active pull-right add-advert-btn-style"
    <i class="glyphicon glyphicon-plus"></i>
    新建落地页
  </a>
</div>
<div class="p-md">
    <table class="table table-bordered table-hover bg-white">
        <thead>
          <tr>
            <th>落地页名称</th>
            <th>创建时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
        </tbody>
        <colgroup>
        <col width="40%">
        <col width="40%">
        <col width="200px">
        </colgroup>
        <tbody>
          <td ><p>11111111111111111</p></td>
          <td >111111</td>
          <td >
            <div class="col-md-6" id="advert-list-action">
              <a name="slideshow" onclick="" class="ng-scope">预览</a>
              <a href="">编辑</a>
              <a name="delete"  href="javascript:deleteAdGroup()"  >删除</a>
            </div>
          </td>
        </tbody>
    </table>
</div>

<script type="text/javascript">
function deleteAdGroup(adGroupId,type){
     bootbox.dialog({
        title : "重要提醒!",
        message:"删除本广告,将删除与该广告相关的信息,并数据不可恢复",
        buttons:{
          "success":{
            "label" : "<i class='icon-ok'></i> 确定",
                   "className":"btn-sm btn-success",
             "callback" : function() {
               $.ajax({
                  url: "/ads/delete/"+adGroupId,
                  type: "POST",
                  dataType: "json",
                  cache: false,
                  success: function(data) {
                    if(data="success"){
                      bootbox.dialog({
                          message:"删除成功",
                          buttons:{
                            "success":{
                              "label" : "<i class='icon-ok'></i> 确定",
                                       "className":"btn-sm btn-success",
                               "callback" : function() {
                                 location.reload();
                               }
                            }
                          }
                        });
                    }

                  }
               })

             }
          }
        }
      });
}

</script>
<script src="/js/gallery/blueimp-gallery.js"></script>
<script src="/js/gallery/jquery.blueimp-gallery.js"></script>
<script src="/js/gallery/jquery.image-gallery.js"></script>
</body>
</html>